import hasRole from './permission/has-role'
import hasPermi from './permission/has-permi'
import dialogDrag from './dialog/drag'
import dialogDragWidth from './dialog/drag-width'
import dialogDragHeight from './dialog/drag-height'
import clipboard from './module/clipboard'
import syncHeight from './sync-height/sync-height'
import Vue from 'vue'
const install = function(Vue) {
  Vue.directive('hasRole', hasRole)
  Vue.directive('hasPermi', hasPermi)
  Vue.directive('clipboard', clipboard)
  Vue.directive('dialogDrag', dialogDrag)
  Vue.directive('dialogDragWidth', dialogDragWidth)
  Vue.directive('dialogDragHeight', dialogDragHeight)
  Vue.directive('syncHeight', syncHeight)
}

if (window.Vue) {
  window['hasRole'] = hasRole
  window['hasPermi'] = hasPermi
  Vue.use(install)
}

export default install
